
package ch.hearc.coursJava.exa2;

import java.net.InetAddress;
import java.net.UnknownHostException;

import com.bilat.tools.reseau.rmi.RmiTools;



public class UseClientB
	{
	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	public static void main(String[] args)
		{
		try
			{
			main();
			}
		catch (UnknownHostException e)
			{
			// TODO Auto-generated catch block
			e.printStackTrace();
			}
		}

	public static void main() throws UnknownHostException
		{
		RMISettings rmiServer = new RMISettings("clientB", RmiTools.getPortDefaultRMI(),RmiTools.getLocalHost());
		RMISettings rmiClient = new RMISettings("clientA", RmiTools.getPortDefaultRMI(), InetAddress.getByName("192.168.1.105"));

		System.out.println(rmiClient);
		System.out.println(rmiServer);

		new Chat(rmiClient, rmiServer);
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/

	}

